
import DesignHome from '@/views/design/DesignHome';
import DesignIndex from '@/views/design/Index';
import Search from '@/views/search/Search';
import { RouteObject } from 'react-router-dom';
import Layout from '../app/Layout';
import RequestDemo from '../demo/RequestDemo';
import Home from '../views/Home';
import Content from '@/views/home/Content';
import Video from '@/views/Video';
import User from '@/views/user/User';
import SuperPlayer from '@/views/player/SuperPlayer';
import Match from '@/views/match/Match';
import Game from '@/views/game/Game';
import History from '@/views/history/History';
import FootPrint from '@/views/footprint/FootPrint';
import DirectSeeding from '@/views/direct-seeding/DirectSeeding';
import News from '@/views/news/News';
import Member from '@/views/member/Member';

const routes: RouteObject[] = [
    {
        path: "/", element: <Layout />,
        children: [
            // 首页
            {
                path: "/", element: <Home />,
                children: [
                    { path: "", element: <Content /> },
                    { path: 'match', element: <Match /> },
                    { path: 'game', element: <Game /> },
                    { path: 'history', element: <History /> },
                    { path: 'footprint', element: <FootPrint /> },
                    { path: 'direct-seeding', element: <DirectSeeding /> },
                    { path: 'news', element: <News /> },
                    { path: 'member', element: <Member /> },
                ]
            },
            // 搜索
            {
                path: "/video", element: <Video />,
                children: [
                    { path: "search", element: <Search /> },
                    { path: "player", element: <SuperPlayer /> },
                ]
            },
            // 设计
            {
                path: "/design", element: <DesignIndex></DesignIndex>,
                children: [
                    { path: "", element: <DesignHome /> },
                ]
            },
            // 用户中心
            {
                path: "/user", element: <User />,
                children: [

                ]
            },

            { path: "/demo", element: <RequestDemo /> },
        ]
    },
];

export default routes;